class TFStationDmgMsg extends LocalMessage;

static function string GetString(
	optional int Switch,
	optional PlayerReplicationInfo RelatedPRI_1,
	optional PlayerReplicationInfo RelatedPRI_2,
	optional Object OptionalObject
	)
{

	return tfStation(optionalobject).buildingname@"("$int((tfStation(optionalobject).health/tfStation(optionalobject).maxHealth)*100)$"%) is under attack!";
}

static simulated function ClientReceive(
	PlayerController P,
	optional int SwitchNum,
	optional PlayerReplicationInfo RelatedPRI_1,
	optional PlayerReplicationInfo RelatedPRI_2,
	optional Object OptionalObject
	)
{
	Super.ClientReceive(P, SwitchNum, RelatedPRI_1, RelatedPRI_2, OptionalObject);

    P.ClientPlaySound(sound'TFMedia.tfDmgWarn',true,float(switchnum)/75+0.1);
}

defaultproperties
{
     bIsUnique=True
     bIsConsoleMessage=False
     bFadeMessage=True
     Lifetime=2
     DrawColor=(B=0,G=120,R=180)
     StackMode=SM_Down
     PosY=0.200000
     FontSize=1
}
